package com.libaba.controller;


import POJO.DbMoudle;
import POJO.ExcelToDb_Excel;
import ExcelToDb.Main;
import POJO.TestMoudle;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;



@RequestMapping("/ExcelToDb")
@RestController
public class ExcelToDbController {

    @RequestMapping("/sendData")
    public void GetExcelFile(@RequestParam("multipartFile") ExcelToDb_Excel excel, DbMoudle dbMoudle) throws Exception {
        System.out.println("i'm in here");
        System.out.println(excel.getMultipartFile().getOriginalFilename());
        Main.START(excel, dbMoudle);
    }

}
